package com.witsight.cassandra.model;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.cassandra.core.PrimaryKeyType;
import org.springframework.data.cassandra.mapping.PrimaryKeyClass;
import org.springframework.data.cassandra.mapping.PrimaryKeyColumn;

import com.witsight.platform.model.IBaseObject;

/**   
 * 说明：例子key
 * @Title: SimpleKey.java 
 * @Package com.witsight.cassandra.util.model 
 * @See: {@link IBaseObject}
 * Copyright: Copyright (c) 2017
 * Company:sany huax witsight team by product
 * @author: penght  
 * @date: 2017年9月21日 下午2:59:58 
 * @version: V1.0
 *
 */
@PrimaryKeyClass
public class SimpleKey implements IBaseObject{	
	private static final long serialVersionUID = 5430222109871877853L;
	@PrimaryKeyColumn(name = "a", ordinal = 0, type = PrimaryKeyType.PARTITIONED)
	private Integer a;
	@PrimaryKeyColumn(name = "b", ordinal = 0, type = PrimaryKeyType.PARTITIONED)
	private Integer b;
	@PrimaryKeyColumn(name = "c", ordinal = 0, type = PrimaryKeyType.CLUSTERED)
	private Integer c;
	
	public Integer getA() {
		return a;
	}
	public void setA(Integer a) {
		this.a = a;
	}
	public Integer getB() {
		return b;
	}
	public void setB(Integer b) {
		this.b = b;
	}
	public Integer getC() {
		return c;
	}
	public void setC(Integer c) {
		this.c = c;
	}
	
	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.SIMPLE_STYLE)
				.append(super.toString())
				.append(this.a)
				.append(this.b)
				.append(this.c)
				.toString();
	}
}
